import { reactive } from 'vue'
import axios from 'axios'

export default function(){
    let dogList = reactive<string[]>([])
    async function addDog(){
        try {
            let returnData = await axios.get('https://dog.ceo/api/breed/pembroke/images/random')
            console.log(returnData)
            if(returnData.status == 200){
                dogList.push(returnData.data.message)
            }
        } catch (error) {
            console.log(error)
        }
    }
    return {dogList,addDog}
}